﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Business_AdminCreate.aspx.cs" Inherits="bianzhuo.SupportPlatform.WebUI.BzBusiness.Business_AdminCreate1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>商家管理员</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="css/Validform.css" rel="stylesheet" />
    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="ckfinder/ckfinder.js"></script>
    <script type="text/javascript" src="js/UpLoadImgByFinder.js"></script>
    <script src="../../ueditor/UpLoadImgByFinder.js"></script>
    <script src="js/Validform_v5.3.2.js"></script>
    <script>

        $(function () {
            $("#form1").Validform({
                type: 1
            })
        })

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="content">
            <ul class="breadcrumb">
                <li></li>

                <li><a href="#">首页</a> <span class="divider">/</span></li>
                <li class="active">商家管理员</li>
            </ul>
            <div class="container">
                <div class="re_form">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <th><span class="biaoji">*</span>管理员登录名：</th>
                            <td>
                                <input class="input_text" type="text" id="TxtLoginName" runat="server" name="wxkeyword" datatype="*" nullmsg="请输入登录名称！" errormsg="请输入正确的登录名称！" />
                                <span class="tips">至少3个字符</span></td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>管理员登录密码：</th>
                            <td>
                                <input class="input_text" type="text" id="TxtLoginPassword" runat="server" name="wxname" minlength="6" maxlength="32" /><span class="tips">6-32个字符</span></td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>昵称：</th>
                            <td>
                                <input class="input_text" type="text" id="nickname" runat="server" name="nickname" datatype="*1-50" nullmsg="请输入昵称！" /><span class="tips">请输入昵称</span></td>
                        </tr>
                                                <tr>
                            <th>权限：</th>
                            <td>
                                <input type="checkbox" name="chkbianji" id="chkbianji" value="1" runat="server" />内容编辑
                                <input type="checkbox" name="chkbianjijlx" id="chkbianjijlx" value="1" runat="server" />内容编辑（仅电话和监理员）
                                <input type="checkbox" name="chkshanchu" id="chkshanchu" value="1" runat="server" />内容删除 （打钩有权限）
                            </td>
                        </tr>
                        <tr>
                            <th>编辑内容时限：</th>
                            <td>
                                <input class="input_text" style="width: 60px" type="text" runat="server" id="SEditTime" name="SEditTime" datatype="n" nullmsg="请输入当没有权限时候发布后的多少分钟内可以再次编辑" />&nbsp;分钟内
                            </td>
                        </tr>
                        <tr>
                            <th><span class="biaoji">*</span>&nbsp;头像：</th>
                            <td>
                                <div class="tem_upimg" style="display: inline-block">
                                    <input type="hidden" runat="server" id="pic" name="pic" class="input_text" />
                                    <div class="onepic" style="display: inline-block; float: left"></div>
                                </div>
                                <span class="tips">请上传头像（建议尺寸：480*480）</span>
                            </td>
                        </tr>


                        <tr>
                            <th><span class="biaoji">*</span>帐号状态：</th>
                            <td>
                                <select id="sltState" runat="server" class="btn">
                                    <option value="1">正常</option>
                                    <option value="0">禁用</option>
                                </select></td>

                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <asp:Button ID="submit" class="btn btn-01" runat="server" Text="保 存"
                                    OnClick="submitClick" /></td>
                        </tr>
                    </table>

                </div>
            </div>
        </div>
    </form>
    <script>


        $("#chkbianji").click(function () {
            if (this.checked)
                $("#chkbianjijlx").attr('checked', false);
        })

        $("#chkbianjijlx").click(function () {
            if (this.checked)
                $("#chkbianji").attr('checked', false);
        })

        $(':text').each(function () {
            if ($(this).next('.tips').length == 0) {
                $(this).after("<span class='tips'>&nbsp;</sapn>");
            }

        }).focus(function () {
            $(this).next('.tips').show();
        }).blur(function () {
            if ($.trim($(this).val()).length < $(this).attr('minlength') || $(this).val().length > $(this).attr('maxlength') || ($(this).attr('data-type') == 'int' && isNaN(parseInt($(this).val()))) || ($(this).attr('data-type') == 'float' && isNaN(parseFloat($(this).val())))) {
                $(this).next('.tips').addClass('tip_er').removeClass('tip_ok');
            } else {
                $(this).next('.tips').removeClass('tip_er').addClass('tip_ok');
            }
        });
        $(function () {
            $('form').submit(function () {
                var err = 0
                $(':text').each(function () {
                    if ($.trim($(this).val()).length < $(this).attr('minlength') || $(this).val().length > $(this).attr('maxlength') || ($(this).attr('data-type') == 'int' && isNaN(parseInt($(this).val()))) || ($(this).attr('data-type') == 'float' && isNaN(parseFloat($(this).val())))) {
                        $(this).focus().next('.tips').addClass('tip_er').removeClass('tip_ok');
                        err++;
                        return false;
                    }
                })
                if (err > 0) return false;
            });
        });
    </script>
</body>
</html>
